#include<bits/stdc++.h>
using namespace std;
long long r[100001];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n,i,x,num1,num2,ans=0;
    queue<int> a;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>x;
        r[x]++;
    }
    for(i=1;i<=100000;i++)
    {
        if(r[i]==0) continue;
        if(a.empty())
        {
            a.push(i);
            continue;
        }
        num2=i;
        while(!a.empty())
        {
            if(r[num1]<=r[num2])
            {
                r[num1]=0;
                a.pop();
                if(a.empty()) num1=num2;
                else
                {
                    num1=a.front();
                }
            }
            else
            {
                r[num1]=r[num1]-r[num2];
                a.push(i);
                break;
            }
        }

    }
    for(i=1;i<=100000;i++) ans=ans+r[i];
    cout<<ans;
}
